//
//  CBPeripheral+RSSI.m
//  EKLLighting
//
//  Created by sunbinbin on 2020/12/16.
//

#import "CBPeripheral+RSSI.h"
@implementation CBPeripheral (RSSI)

char nameKey;
char nameKey2;
char nameKey3;
char nameKey4;
char nameKey5;
char nameKey6;
char nameKey7;

- (void)setRssi:(NSNumber *)rssi{
    objc_setAssociatedObject(self, &nameKey, rssi, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSNumber *)rssi{
    return objc_getAssociatedObject(self, &nameKey);
}

- (void)setDeviceType:(NSNumber *)deviceType {
    objc_setAssociatedObject(self, &nameKey7, deviceType, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSNumber *)deviceType {
    return objc_getAssociatedObject(self, &nameKey7);
}

-(void)setAdvertisementData:(NSDictionary *)advertisementData {
    objc_setAssociatedObject(self, &nameKey2, advertisementData, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

-(NSDictionary *)advertisementData {
    return objc_getAssociatedObject(self, &nameKey2);
}

- (void)setFounctionlist:(NSArray *)founctionlist {
    objc_setAssociatedObject(self, &nameKey3, founctionlist, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSArray *)founctionlist {
    return objc_getAssociatedObject(self, &nameKey3);
}

- (void)setMacAddress:(NSString *)macAddress {
    objc_setAssociatedObject(self, &nameKey4, macAddress, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSString *)macAddress {
    return objc_getAssociatedObject(self, &nameKey4);
}

- (void)setChipInfo:(NSString *)chipInfo {
    objc_setAssociatedObject(self, &nameKey5, chipInfo, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSString *)chipInfo {
    return objc_getAssociatedObject(self, &nameKey5);
}

- (void)setTargetStep:(NSString *)targetStep{
    objc_setAssociatedObject(self, &nameKey6, targetStep, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (NSString *)targetStep {
    return objc_getAssociatedObject(self, &nameKey6);
}

@end
